<?PHP 
require_once('classes/classAudio.php');
require_once('classes/classUtils.php');

$audios = new Audio();
$utils = new Utils();

if(isset($_GET["nid"])){
	$audios->delAudio($_GET["nid"]);
}

$arrAudios = $audios->getTop20();

$sRows ='';
?>
<form action="" method="post" name="frmDelNotas">
  <table width="100%" border="1" cellspacing="2" cellpadding="4">
  <tr class="tablaEditor">
    <td>&nbsp;</td>
    <td>T&iacute;tulo</td>
    <td>Fecha de Publicaci&oacute;n</td>
    <td>Audio</td>
  </tr>
  <?PHP
  for($i=0; $i<sizeof($arrAudios); $i++){
	
	if($i%2==0){
		$sRows .= "<tr class='evenRow'>";
	}
	else{
		$sRows .= "<tr class='oddRow'>";
	}
	
	$fecha = date('d/m/Y', strtotime($arrAudios[$i]["fecha_publicacion"]));
	
    $sRows .= "<td><a href=\"Editor.php?AX=11&BX=22&nid="
			.$arrAudios[$i]["id"]."\">Borrar</a></td>
		    <td>".$arrAudios[$i]["titulo"]."</td>
		    <td>".$fecha."</td>
		    <td>".$arrAudios[$i]["link_text"]."</td>
		  </tr>";
	}
	
	echo $sRows;
?>  
  <tr>
    <td colspan="4">&nbsp;</td>
    </tr>
</table>
</form>